package com.kingzoon.seckill.enums;

/**
 * 宏定义工具类
 * @author xiemin
 * @date 2016-10-18上午11:12:39
 * @version 1.0
 */
public class MacroDefine {

	public static enum SECKILLSTATE {
		SUCCESS(1, "秒杀成功"), END(0, "秒杀结束"), REPEAT_KILL(-1, "重复秒杀"), INNER_ERROE(-2, "系统异常"), DATA_REWRITE(-3, "数据篡改");

		private int state;
		private String stateInfo;

		private SECKILLSTATE(int state, String stateInfo) {
			this.state = state;
			this.stateInfo = stateInfo;
		}

		public int getState() {
			return state;
		}

		public void setState(int state) {
			this.state = state;
		}

		public String getStateInfo() {
			return stateInfo;
		}

		public void setStateInfo(String stateInfo) {
			this.stateInfo = stateInfo;
		}

	}

	//基础类返回码
	public static enum JC_CODE {

		S_0000("0000", "处理成功"), E_0001("0001", "处理失败"), S_1111("1111", "已受理"), S_1112("1112", "已受理，需要上送短信验证码"), P_4444("4444", "处理中"), R_9806("9806", "未知银行错误信息"), R_9997("9997", "交易结果未知请查询"), R_9998("9998", "交易超时"), R_9999("9999", "系统错误");

		private String code;
		private String message;

		private JC_CODE(String code, String message) {
			this.code = code;
			this.message = message;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getMessage() {
			return message;
		}

		public void setMessage(String message) {
			this.message = message;
		}

	}

	//格式类返回码
	public static enum GS_CODE {

		E_1001("1001", "未定义的消息域"), E_1002("1002", "必填域缺失"), E_1003("1003", "消息域格式不合法");

		private String code;
		private String message;

		private GS_CODE(String code, String message) {
			this.code = code;
			this.message = message;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getMessage() {
			return message;
		}

		public void setMessage(String message) {
			this.message = message;
		}

	}

	//安全类返回码
	public static enum AQ_CODE {

		E_1100("1100", "报文验签失败"), E_1101("1101", "报文解密失败");

		private String code;
		private String message;

		private AQ_CODE(String code, String message) {
			this.code = code;
			this.message = message;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getMessage() {
			return message;
		}

		public void setMessage(String message) {
			this.message = message;
		}

	}

	//权限类返回码
	public static enum QX_CODE {

		E_5001("5001", "未开通该交易"), E_5002("5002", "业务编码不合法"), E_5003("5003", "产品代码不合法"), E_5004("5004", "未开通该渠道"), E_5005("5005", "无交易权限"), E_5006("5006", "状态关闭"), E_5007("5007", "渠道已关闭"), E_5008("5008", "未配置可用渠道"), E_5009("5009", "银行未开通");

		private String code;
		private String message;

		private QX_CODE(String code, String message) {
			this.code = code;
			this.message = message;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getMessage() {
			return message;
		}

		public void setMessage(String message) {
			this.message = message;
		}

	}

	//业务类返回码
	public static enum YW_CODE {

		E_5100("5100", "交易类型不合法"), E_5101("5101", "机构代码不合法"), E_5102("5102", "商户代码不合法"), E_5103("5103", "版本号不合法"), E_5104("5104", "银行编码不合法"), E_5105("5105", "卡BIN检查失败"), E_5106("5106", "交易日期不合法"), E_5107("5107", "交易时间不合法"), E_5108("5108",
				"流水号重复"), E_5109("5109", "账户类型不合法"), E_5110("5110", "账号与银行编码不一致"), E_5111("5111", "证件类型不合法"), E_5112("5112", "鉴权失败"), E_5113("5113", "当日签约不能解约"), E_5114("5114", "绑定关系无效"), E_5115("5115", "绑定关系已存在"), E_5116("5116", "原交易已是终态"), E_5117(
				"5117", "交易币种不合法"), E_5118("5118", "交易币种不支持"), E_5119("5119", "交易金额不合法"), E_5120("5120", "交易金额超过支付限额"), E_5121("5121", "交易金额超过累计支付限额"), E_5122("5122", "交易超过累计支付次数"), E_5123("5123", "支付金额不合法"), E_5124("5124", "不在申购期内"), E_5125(
				"5125", "不在认购期内"), E_5126("5126", "产品状态异常"), E_5127("5127", "交易订单号不合法"), E_5128("5128", "卡类型不合法"), E_5129("5129", "当日有交易不能解约"), E_5146("5146", "机构银联商户号不合法"), E_5147("5147", "证件号码不合法"), E_5148("5148", "交易金额超过累计单日限额"), E_5149(
				"5149", "交易金额超过累计单月限额"),E_5150("5150","注册手机号重复"),E_5151("5151","提现申请冻结不存在");

		private String code;
		private String message;

		private YW_CODE(String code, String message) {
			this.code = code;
			this.message = message;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getMessage() {
			return message;
		}

		public void setMessage(String message) {
			this.message = message;
		}

	}

	//账户类返回码
	public static enum ZH_CODE {

		E_5400("5400", "无此账户"), E_5401("5401", "账户无交易权限"), E_5402("5402", "账户状态异常"), E_5403("5403", "密码错误一次"), E_5404("5404", "密码错误二次"), E_5405("5405", "密码错误三次"), E_5406("5406", "密码错误次数超限"), E_5407("5407", "密码错误"), E_5408("5408", "超过渠道限额"), E_5409(
				"5409", "超出渠道支付次数"), E_5410("5410", "渠道拒绝交易"), E_5411("5411", "余额不足"), E_5412("5412", "协议状态无效"), E_5413("5413", "卡挂失"), E_5414("5414", "签约记录不存在"), E_5415("5415", "银行返回重复签约"), E_5500("5500", "未知异常"), E_5501("5501", "短信验证码错误"), E_5502(
				"5502", "短信验证码次数超限"), E_5416("5416", "重复账户"), E_5417("5417", "账户验证失败");

		private String code;
		private String message;

		private ZH_CODE(String code, String message) {
			this.code = code;
			this.message = message;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getMessage() {
			return message;
		}

		public void setMessage(String message) {
			this.message = message;
		}

	}

}
